 |
 |
 |
 |
#242595 - 04/14/03 05:51 PM
Re: why?
[Re: Dawg_dup1]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
Make sure you used $Body. Variables are case sensitive. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br />For 6.1.1. I think you'd need to change this:<br /><br /> $query = "<br /> SELECT t1.B_Number,t1.B_Parent,t1.B_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,<br />t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Sticky,<br />t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File<br /><br /><br />To this:<br /><br /> $query = "<br /> SELECT t1.B_Number,t1.B_Parent,t1.B_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,<br />t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Sticky,<br />t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t1.B_Body<br /><br /><br />And this:<br /><br /> list($Number,$Parent,$Username,$Posted,$Last_Post,$Subject,<br />$Main,$Open,$Approved,$icon,$Reged,$Counter,$Sticky,$Replies,$Rating,<br />$Rates,$stars,$Color,$PostStatus,$posterid,$file) = $dbh -> fetch_array($sth);<br /><br /> // -------------------------<br /> // Standard icon is the note<br /> if (!$icon) {<br /> $icon = "book.gif";<br /> }<br /><br /><br />To this:<br /><br /> list($Number,$Parent,$Username,$Posted,$Last_Post,$Subject,<br />$Main,$Open,$Approved,$icon,$Reged,$Counter,$Sticky,$Replies,$Rating,<br />$Rates,$stars,$Color,$PostStatus,$posterid,$file,$Body) = $dbh -> fetch_array($sth);<br /><br /> // -------------------------<br /> // Standard icon is the note<br /> if (!$icon) {<br /> $icon = "book.gif";<br /> }<br /><br />// -------------------<br />// Limit the number of characters in the Body - by extremebikini<br /> $Body = strip_tags($Body);<br /> $Body = htmlspecialchars($Body);<br /> if ( strlen($Body) > 100 ) {<br /> $Body = substr($Body, 0, 100);<br /> $Body .= " ...";<br /> }<br /><br /><br /><br />The postrow[$z] step and the changes to the tmpl file are the same. <img src="/forum/images/graemlins/wink.gif" alt="" /><br /><br /><br />
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#242604 - 04/15/03 09:25 PM
Re: [6.2] Alt Body Preview of a Thread 1.0
[Re: Daine]
|
Member
Registered: 06/14/02
Posts: 166
Loc: Indiana
|
Here's an example of what I was getting for postlist.php after trying to install this mod as it's documented: <br /> <br />Unable to do_query: SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Last_Number,t1.B_Last_Name,t1.B_Last_Approved,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body FROM w3t_Posts AS t1, w3t_Users AS t2 WHERE t1.B_Topic = 1 AND t1.B_Board = 'main' AND t1.B_PosterId = t2.U_Number AND (t1.B_Last_Post > 1049229624 OR t1.B_Sticky = '1') ORDER BY t1.B_Sticky DESC,t1.B_Last_Post DESC LIMIT 21 - Unknown column 't1.B_Last_Number' in 'field list' <br /> <br />The version I was using was the original attachment, which I believe is the 6.2 version.
Edited by ZealotOnAStick (04/15/03 09:27 PM)
|
|
Top
|
|
|
|
 |
 |
 |
 |
 |
 |
 |
 |
#242606 - 04/15/03 09:32 PM
Re: [6.2] Alt Body Preview of a Thread 1.0
[Re: Daine]
|
I type Like navaho
Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
|
This is the query you are doing:<br /><br />SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Last_Number,t1.B_Last_Name,t1.B_Last_Approved,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body<br /><br />This is the query in my instructions:<br /><br /> SELECT t1.B_Number,t1.B_Parent,t2.U_Username,t1.B_Posted,t1.B_Last_Post,t1.B_Subject,t1.B_Main,t1.B_Status,t1.B_Approved,t1.B_Icon,t1.B_Reged,t1.B_Counter,t1.B_Replies,t1.B_Rating,t1.B_Rates,t1.B_RealRating,t2.U_Color,t2.U_Status,t1.B_PosterId,t1.B_File,t2.U_Number,t1.B_Sticky,t1.B_AnonName,t1.B_Body<br /><br /><br /><br />You are trying to query last post by mod fields.... but they are not in my instructions. The word "last" appears in the attachment only 4 times. <br /><br />You did it wrong. Start with a fresh copy and try again.
|
|
Top
|
|
|
|
 |
 |
 |
 |
|
|